package com.dfbz.demo07_反射与泛型;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo02_无限制擦除 {

    public static void main(String[] args) {

        // 字节码对象
        Class<Printer> printerClass = Printer.class;

        Field[] fields = printerClass.getDeclaredFields();
        for (Field field : fields) {
            System.out.println(field);
        }

        System.out.println("--------------------");

        Method[] methods = printerClass.getDeclaredMethods();
        for (Method method : methods) {
            System.out.println(method);
        }
        System.out.println("---------");

    }
}

class Printer<T> {

    private T param;

    public T getParam() {
        return param;
    }

    public void setParam(T param) {
        this.param = param;
    }
}
